#ifndef _BLOCKCRAFT_APP
#define _BLOCKCRAFT_APP

#define BLOCKCRAFT_VERSION "0.1.6"

#include "ofMain.h"
#include "Resources.h"
#include "Environment.h"
#include "Player.h"

#include <utility>

using namespace std;

class BlockCraft : public ofBaseApp{
        ofPoint rawMousePos;
        ofImage mouseSprite;

        void drawBackground();

        int lastbutton;

        bool displayDebug;

	public:
		void setup();
		void update();
		void draw();
        void exit();

		void keyPressed  (int key);
		void keyReleased(int key);
		void mouseMoved(int x, int y );
		void mouseDragged(int x, int y, int button);
		void mousePressed(int x, int y, int button);
		void mouseReleased(int x, int y, int button);
		void windowResized(int w, int h);

        void updateMousePosition(int x, int y);

        bool isInDebugMode();

        float drawScale;

        ofPoint viewOffset;
        ofPoint mousePos;

        struct {float txlo, txhi, tylo, tyhi;} bgparams;
};

#endif
